package com.example.armmvvm

import org.junit.Test

/**
 *  author : yanghaozhang
 *  date : 2022/11/2 10:10
 *  description :
 */

interface SInt {
    fun showInt()
}

class SIntImp : SInt {
    override fun showInt() {
        System.out.println(this.toString())
    }
}


class GInt(k: SInt = default) : SInt by k {

    companion object {
        val default = SIntImp()
    }

    fun read() {

    }
}

class TestKKK {


    @Test
    fun goI() {
        System.out.println("lll")
        val gInt = GInt(SIntImp())
        gInt.showInt()
        GInt().showInt()
        GInt().showInt()
        gInt.showInt()
    }
}
